<div class="page">
	<div class="layoutBox">
    
	<form method="post" action="__URL__/update/navTabId/__MODULE__" class="pageForm required-validate" enctype="multipart/form-data" onsubmit="return iframeCallback(this, dialogAjaxDone)">
		<input type="hidden" name="id" value="{$vo.id}" />
		<div class="pageFormContent" layoutH="100">
            <div class="unit">
                <label>视频标题：</label>
                <input type="text" size="40" class="required"   name="title" value="{$vo.title}">
            </div>		
            <div class="unit">
                <label>所属分类：</label>
                <input type="text" class="required" size="40" readonly="readonly" id="categoryName_edit_video" name="categoryName" value="{$vo.tid|getCategoryName}"/>
                <a class="unit btn" href="__APP__/Ui/tree/mod/__MODULE__/selparent/0/selmore/0/cid/tid_edit_video/cname/categoryName_edit_video" target="dialog" rel="tree" mask="true" title="选择分类" width="400" height="450">选择分类</a>
                <input type="hidden" class="required" id="tid_edit_video" name="tid" value="{$vo.tid}" />
            </div>
            <div class="unit">
                <label>关键字：</label>
                <input type="text" size="40" name="keywords" value="{$vo.keywords}">
            </div>		
            <div class="unit">
                <label>描述：</label>
                <input type="text" size="40" name="description" value="{$vo.description}">
            </div>
            <div class="unit">
                <label>URL重写：</label>
                <input type="text" size="40" name="rewrite" value="{$vo.rewrite}">
            </div>
            <div class="unit">
                <label>使用模板：</label>
                <input type="text" size="40" name="template" value="{$vo.template}">
            </div>				
            <div class="unit">
                <label>排序值：</label>
                <input type="text" name="sort" size="40" value="{$vo.sort}"/>
            </div>			
            <div class="unit">
                <label>状态：</label>
                <select class="small bLeft"  name="status">
                    <option <eq name="vo.status" value="1" >selected</eq> value="1">启用</option>
                    <option <eq name="vo.status" value="0" >selected</eq> value="0">禁用</option>
                </select>
            </div>
            <div class="unit">
                <label>小图片：</label>
                <notempty name="vo.img">
                    <a href="{$vo.img|chimg=video}" target="_blank"><img src="{$vo.img|chimg=video,100,100}" border="0" /></a>
                    <a href="__URL__/delfile/id/{$vo.id}/field/img/navTabId/__MODULE__" target="ajaxTodo" title="你确定要删除吗？">删除图片</a>
                <else/>
                    <input type="file" name="img">
                </notempty>
            </div>	            
            <div class="unit">
                <label>外部小图片：</label>
                <input type="text" name="imgurl" id="imgurl" size="40" value="<?php echo false!==strpos($vo['img'], '/') ? $vo['img'] : ''; ?>">
            </div>            
			<div class="unit">
                <label>上传视频：</label>
                <?php if($vo['file']!='' && false===strpos($vo['file'],'/')){ ?>
                {$vo.file}&nbsp;&nbsp;<a href="__URL__/delfile/id/{$vo.id}/field/file/navTabId/__MODULE__" target="ajaxTodo" title="你确定要删除视频吗？">删除视频</a>
                <?php }else{?>
                <input type="file" name="file" />
                <?php }?>
            </div>	
            <div class="unit">
                <label>外部视频：</label>
                <input type="text" name="fileurl" id="fileurl" size="40" value="<?php echo false!==strpos($vo['file'], '/') ? $vo['file'] : ''; ?>">
            </div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
	</div>
</div>
<script>
$(document).ready(function(){
	$('.video').click(function(){
		$('#url').val($(this).attr('value'));
	});	
});
</script>